<!-- 手机号登录 -->
<template>
  <wd-form :model="loginData.loginForm" ref="gennerateForm">
    <wd-input
      v-model="loginData.loginForm.phoneNo"
      prefixIcon="phone"
      placeholder="请输入手机号"
      @focus="() => handleInputFocus('tenantName')"
    />
    <view class="mt-5">
      还没有账号？
      <navigator href="#" class="inline text-[var(--wot-color-primary)]">
        注册账号
      </navigator>
    </view>

    <wd-button :block="true" :round="false" custom-class="mt-8">
      <text>下一步</text>
    </wd-button>
  </wd-form>
</template>

<script lang="ts" setup>
  defineOptions({ name: 'PhoneLogin' })
  const loginData = ref({
    loginForm: {
      tenantName: import.meta.env.VITE_APP_DEFAULT_LOGIN_TENANT || '',
      username: import.meta.env.VITE_APP_DEFAULT_LOGIN_USERNAME || '',
      password: import.meta.env.VITE_APP_DEFAULT_LOGIN_PASSWORD || '',
      phoneNo: '',
      rememberMe: true // 默认记录我。如果不需要，可手动修改
    }
  })

  function handleInputFocus(name: string) {}
</script>
